<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>上传文件</title>
    <th:block th:include="fragment_header :: header">
    </th:block>
</head>
<body>
<div th:replace="fragment_menu :: navmenu"></div>
<h5>上传题目文件</h5>
<div class="card" style="padding:0px 100px ">
    <div class="card-body" style="padding:20px 80px ">
        <form action="#" th:action="@{ /questions/upload/save }" th:object="${uploadModel}" method="post"
              enctype="multipart/form-data" class="form-horizontal">
            <div class="row">
                <label class="col-sm-2 col-form-label">文件描述 *</label>
                <div class="col-sm-10">
                    <div class="form-group bmd-form-group">
                        <input th:field="*{description}" type="text" class="form-control" required/>
                    </div>
                </div>
            </div>

            <div class="row">
                <label class="col-sm-2 col-form-label">文件</label>
                <div class="col-sm-10">
                    <input class="form-control" type="file"  accept=“.TXT” th:field="*{file}" required>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-10 offset-sm-2">
                    <div class="form-group">
                        <button type="submit" name="save" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>